#ifndef SIBLINGLIST_H
#define SIBLINGLIST_H

#include <QObject>

class UmlRelationalItem;

class SiblingList : public QObject
{
    Q_OBJECT
public:
    SiblingList();
    ~SiblingList();

    void addItem(UmlRelationalItem *item);
    void removeItem(UmlRelationalItem *item);

    QList<UmlRelationalItem*> xSiblings();
    QList<UmlRelationalItem*> ySiblings();

    bool isEmpty();

protected:
    QList<UmlRelationalItem*> _xList;
    QList<UmlRelationalItem*> _yList;
    qreal _minX;
    qreal _minY;
    qreal _maxX;
    qreal _maxY;

    void addToXList(UmlRelationalItem *item);
    void addToYList(UmlRelationalItem *item);

signals:
    void dataChanged();
};

#endif // SIBLINGLIST_H
